find_program(PANDOC NAMES pandoc pandoc.exe)
find_program(PANDOC_CROSSREF NAMES pandoc-crossref pandoc-crossref.exe)
mark_as_advanced(PANDOC)
mark_as_advanced(PANDOC_CROSSREF)
if(PANDOC  AND PANDOC_CROSSREF)
  message(STATUS "Enabling generation of documentation based on pandoc")
  set(MGIS_HAVE_PANDOC ON)
elseif(PANDOC AND PANDOC_CROSSREF)
  message(STATUS "Disabling generation of documentation based on pandoc")
  set(MGIS_HAVE_PANDOC OFF)
endif(PANDOC AND PANDOC_CROSSREF)

if(PANDOC)
  message(STATUS "pandoc:          ${PANDOC}")
elseif(PANDOC)
  message(STATUS "pandoc:          not found")
endif(PANDOC)
if(PANDOC_CROSSREF)
  message(STATUS "pandoc-crossref: ${PANDOC_CROSSREF}")
elseif(PANDOC_CROSSREF)
  message(STATUS "pandoc-crossref: not found")
endif(PANDOC_CROSSREF)
